home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / editor / editor2 / textengn.lha / Textengine / Textengine.ged < prev    next >
Text File  |  1996-12-23  |  2KB  |  88 lines

  1. /*$VER: Textengine.ged 1.0 (6.10.96)
  2.      by toenges@fact.rhein-ruhr.de
  3.  
  4. startup */
  5.  
  6. options results
  7. parse arg target n
  8. if (left(address(), 6) ~= "GOLDED") then
  9. address 'GOLDED.1'
  10. 'LOCK CURRENT'
  11. 'QUERY HOST'
  12. myhost='address 'RESULT
  13. exitval=0
  14. x=0
  15. options failat 6
  16. signal on syntax
  17.  
  18. /* main */
  19.  
  20. 'GOTO BYTE=2'
  21. STYLE=''
  22. 'EXTRACT LEFT="<" RIGHT=">" VAR STYLE'
  23. transfer=1
  24. n=left(STYLE,12)
  25. if n="PREPROCESSED" then do
  26.  transfer=2
  27.  x=1
  28. end
  29. if target="" then transfer=0
  30. else do
  31.  'SAVE ALL SMART'
  32.  'QUERY DOC VAR ORIGINAL'
  33. end
  34. call "ENV:Textengine"
  35. modules=RESULT
  36. tem=modules||STYLE||'.tes'
  37. n=exists(tem)
  38. if n then do
  39.  temcall='call "'||tem||'" "'||myhost||'"'
  40.  interpret temcall
  41.  exitval=RESULT
  42.  interpret myhost
  43. end
  44. if ((transfer<2)&(~n)) then do
  45.  if x=0 then do
  46.   'REQUEST BODY="Style not found!||'STYLE'" BUTTON="Ok" TITLE="Textengine 1.0: Problem"' 
  47.  end
  48.  else 'REQUEST BODY="Can''t Transfer,|need a target!" BUTTON="Ok" TITLE="Textengine 1.0: Problem"'
  49.  exitval=10
  50. end
  51. else if ((exitval=0)&(transfer>0)) then do
  52.  temcall=modules||target||'.tet'
  53.  n=exists(temcall)
  54.  if n then do
  55.   temcall='call "'||temcall||'" "'||myhost||'"'
  56.   interpret temcall
  57.   exitval=RESULT
  58.   interpret myhost
  59.  end
  60.  else do
  61.   'REQUEST BODY="Target not found!||'target'" BUTTON="Ok" TITLE="Textengine 1.0: Problem"'
  62.   exitval=10
  63.  end
  64.  'UNDO FLUSH'
  65.  'SAVE ALL NAME="t:te.out"'
  66.  if ~(exitval=-1) then do
  67.   'OPEN 'ORIGINAL
  68.   'UNDO FLUSH'
  69.   exitval=0
  70.  end
  71. end
  72. else 'SAVE ALL NAME="t:te.out"'
  73.  
  74. /* end */
  75.  
  76. ende:
  77. 'MARK HIDE'
  78. 'UNLOCK'
  79. exit exitval
  80.  
  81. /* error */
  82.  
  83. syntax:
  84. interpret myhost
  85. say "Sorry, error line" SIGL ":" errortext(RC) ":-("
  86. exitval=20
  87. call ende
  88.